<template>
    <div>
      <ul>
        <li v-for="(item,index) in data2" :key="index">
          <span>{{item.content}}</span>
          <img :src="item.pic" alt="">
        </li>
      </ul>
    </div>
</template>

<script>
  import * as common from "../../../api/common.js";
    export default {
      name: "News",
      data(){
        return {
          data2:[]
        }
      },
      beforeMount(){
        let parms = {user_id:this.$store.state.user_id};
        common.inform(parms).then(res=>{
          console.log(res);
          this.data2 = res.data;
        })
      }
    }
</script>

<style scoped>
 ul li{
   padding: 20px 40px;
   border-bottom: 2px solid #dcdcdc;
   display: flex;
   justify-content: space-between;
 }
 ul li span{
   font-size: 26px;
   align-self: center;
 }
 ul li img{
   width: 220px;
   height: 140px;
   border-radius: 15px;
 }
</style>
